<template>
    <div class="Child">
        <slot name="s1" ></slot>
        <!-- 设置参数 -->
        <slot name="s2" :gameList="games"></slot>
    </div>
    </template>
    
    <script lang="ts">
    export default {
    name:'Child'
    }
    </script>
    
    <script setup lang="ts">
    let games = [
        { id: 1, gameName: '游戏1' },
        { id: 2, gameName: '游戏2' },
        { id: 3, gameName:'游戏3' }        
    ]
    </script>
    
    <style lang="css">
    .Child{
        margin: 20px;
        height: 200px;
        width: 200px;
        background-color:bisque;
    }
    .Child h1{
        background-color:blue;
        color: aliceblue;
        text-align: center;
        font-weight: 100;
    }
    </style>